import { SetMetadata } from '@nestjs/common'
import { UserRole } from '../../../common/decorators/auth.decorator'

export const ROLES_KEY = 'roles'

/**
 * 角色装饰器
 * @param roles 允许的角色列表
 */
export const Roles = (...roles: UserRole[]) => SetMetadata(ROLES_KEY, roles)
